<!doctype html>
<html>
    <head>
        <style type='text/css'>
		html { font-family:Helvetica; color:#222; }
		h1 { color:steelblue; font-size:24px; margin-top:24px; }
		button { margin:10 30px 20px; font-size:20px; }
		.logLine { border-bottom:1px solid #ccc; padding:4px 2px; font-family:courier; font-size:11px; }
            </style>
    </head>
    <body>
        <h1>WKWebView</h1>
    
        <script>
        

            function printButton() {

                window.webkit.messageHandlers.printQR.postMessage({"Im JS": "I give your Data"});
                }
    
            function getRelatedArticles(data) {

                alert(data)

                window.webkit.messageHandlers.printQR.postMessage({"Im JS": "I recived data fram swift"});
            }
    
    
            function alertShow() {
                alert('hello,world')
            }
    
	

            </script>
    
            <div id='buttons'></div>
    
            <button id = "print" onclick = "printButton()">点我传值给Swift</button>

            <button id = "abd" onclick = "alertShow()">alertShow</button>
    
    </body>
</html>
